package com.assumejson.circular_dependency.config;

import com.assumejson.circular_dependency.service.BService;
import com.assumejson.circular_dependency.service.CService;
import com.assumejson.circular_dependency.service.TestBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @author by gang.Li 2022/4/8 14:10
 */
@Configuration(proxyBeanMethods = false)
@ComponentScan("com.assumejson.circular_dependency")
public class AppConfig {

	@Bean
	public CService cService() {
		System.out.println(testBean());
		System.out.println(testBean());
		return new CService();
	}

	@Bean
	public TestBean testBean() {
		return new TestBean();
	}
}
